{% load my_filter %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div>

    <p>
        {{ 20 | age_adult }}
    </p>

    {{ title }}
{#    {{ title | safe }} <br>#}
    {{ name | length }}
    {{ abc | default:'没有这个变量' }}
    <p>
        {{ date | date:"Y/m/j  H:i:s" }}
    </p>
</div>
<div>
    姓名:{{ name }}, 年龄:{{ age }}, 成年否:{{ age | age_adult }}
    {% if age > 18 and gender == '男' %}
        能看电影
    {% elif age > 12 %}
        能看动画片
    {% else %}
        不能看电视
    {% endif %}
</div>


<p>
    城市:{{ city }}
</p>
<p>
    字典:{{ adict.name }}---{{ adict.author }}
    列表:{{ alist.4 }}
</p>
<p>
    {{ adict }} <br>
    {{ alist }}

</p>
<p>
    {% for i in alist %}
        <div>{{ forloop.counter }}-{{ forloop.counter0 }}-{{ forloop.first }}-
            {{ forloop.last }}-{{ forloop.revcounter }}-{{ forloop.revcounter0 }}-
            {{ i }}</div>
    {% empty %}
        <div>没有内容</div>
    {% endfor %}
{% for i in blist %}

{% empty %}
    <div style="color: red">无内容</div>
{% endfor %}
<br>
{% for key,value in adict.items %}
    <div>{{ forloop.counter }}-{{ forloop.counter0 }}-{{ forloop.first }}-
        {{ forloop.last }}-{{ forloop.revcounter }}-{{ forloop.revcounter0 }}
        -{{ key }}-{{ value }}</div>
{% endfor %}

</p>
</body>
</html>